import ComponentBase from "../engine/ComponentBase";
import { EventManager } from "../engine/EventManager";
import { Logger } from "../engine/Logger";
import UIManager from "../engine/UIManager";
import { EventConfig } from "../game/config/EventConfig";
import { GameConfig } from "../game/config/GameConfig";
import { RoomConfig } from "../game/config/RoomConfig";
import { ViewConfig } from "../game/config/ViewConfig";
import { RoomModel } from "../game/model/RoomModel";
import { RoomPlayer } from "../game/model/RoomPlayer";
import { UserModel } from "../game/model/UserModel";
import { UIHelper } from "../game/util/UIHelper";

const { ccclass, property } = cc._decorator;

@ccclass
export class GamPlayerManagerBase extends ComponentBase {

    private playerPrefab: cc.Node;

    onEnable(): void {
        super.onEnable();
        this.playerPrefab = this.getChild(this.node, "playerNode")
        this.playerPrefab.active = false;
        this.hideAllChildren(this.playerPrefab.parent)
        EventManager.instance.on(EventConfig.Event_Update_Room_Player, this.refresh, this)
    }


}